<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script src="./jquery-3.6.0.min.js"></script>
</head>
<body>
<!--https://www.cnblogs.com/dw3306/p/9381720.html-->

1111<input  id="btn"  type="text"    />

<script>


    $("#btn").keydown(function(event){
        if(event.keyCode == 13){
            alert('你按下了Enter');
        }
    });
</script>
</body>
</html>